import request from '@/utils/request';

//获取海报列表
export function posterList(data: any) {
    return request({
        url: '/scrm-api/console/market/poster/list',
        method: 'POST',
        data,
        noNeedLoading: true
    });
}
// 批量删除
export function batchDel(data: any) {
    return request({
        url: '/scrm-api/console/market/poster/del',
        method: 'post',
        data,
        noNeedLoading: true
    });
}
// 批量下载
export function batchDownload(data: any) {
    return request({
        url: '/scrm-api/console/market/poster/download',
        method: 'post',
        data
    });
}
// 下载统计
export function downStat(data: any) {
    return request({
        url: '/scrm-api/console/market/poster/incr-download',
        method: 'GET',
        params: data
    });
}
// 创建海报
export function createPoster(data: any) {
    return request({
        url: '/scrm-api/console/market/poster/create',
        method: 'post',
        data
    });
}
// 编辑海报
export function editPoster(data: any) {
    return request({
        url: '/scrm-api/console/market/poster/edit',
        method: 'post',
        data
    });
}

// 获取海报详情
export function getPosterDetail(data: any) {
    return request({
        url: '/scrm-api/console/market/poster/detail',
        method: 'get',
        params: data
    });
}

// 获取模板类型接口
export function getTemplateTypeList(data: any) {
    return request({
        url: '/scrm-api/console/market/poster/template/type/list',
        method: 'get',
        params: data
    });
}
// 获取模板数据类型
export function getTemplateList(data: any) {
    return request({
        url: '/scrm-api/console/market/poster/template/list',
        method: 'get',
        params: data
    });
}

// 营销工具 获取分组
export function getGroupMarket(data: any) {
    return request({
        url: '/scrm-api/console/tenant/group/list-for-market',
        method: 'post',
        data
    });
}

// 营销工具  获取渠道活码
export function getMarketChannel(data: any) {
    return request({
        url: '/scrm-api/console/market/channel/list',
        method: 'post',
        data
    });
}
// 营销工具  获取群活码
export function getMarketGroup(data: any) {
    return request({
        url: '/scrm-api/console/market/groupchat/list',
        method: 'post',
        data
    });
}
// 营销工具  获取列表引流
export function getMarketFission(data: any) {
    return request({
        url: '/scrm-api/console/market/fission/list',
        method: 'post',
        data
    });
}

// 营销工具 抽奖引流
export function getMarketLottery(data: any) {
    return request({
        url: '/scrm-api/console/market/luckdraw/lottery/list',
        method: 'get',
        params: data
    });
}
// 营销工具 签到活动
export function getMarketSignIn(data: any) {
    return request({
        url: '/scrm-api/console/marke/sign-in/list',
        method: 'post',
        data
    });
}
// 营销工具 门店获客
export function getMarketStore(data: any) {
    return request({
        url: 'scrm-api/console/market/store-customer/list',
        method: 'post',
        data
    });
}
// 营销工具 红包拉新
export function getMarketRed(data: any) {
    return request({
        url: '/scrm-api/console/market/red/list',
        method: 'post',
        data
    });
}
// 营销工具 红包裂变
export function getMarketRedFission(data: any) {
    return request({
        url: '/scrm-api/console/market/red-fission/list',
        method: 'post',
        data
    });
}
// 营销工具 签到活动
export function getMarketSing(data: any) {
    return request({
        url: 'scrm-api/console/market/sign-in/list',
        method: 'post',
        data
    });
}
// 营销工具 口令红包
export function getMarketPassword(data: any) {
    return request({
        url: '/scrm-api/console/market/password-red/list',
        method: 'GET',
        params: data
    });
}
